using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
namespace Jasongozy.Copor {
    public class TemplateTreeNode {

        public string TemplateNodeName;
        public bool HasRegion;
        public List<TemplateTreeNode> ChildNodes = new List<TemplateTreeNode> ();
        public Dictionary<string, List<FunctionCallArg>> Funcations = new Dictionary<string, List<FunctionCallArg>>();
        public TemplateTreeNode Parent;
        public string TemplateContent;
        public string FilePath;
        public bool IsFileRoot {
            get {
                return !string.IsNullOrEmpty(FilePath);
            }
        }
        public string SourceFilePath;

        public bool IsRoot() {
            return Parent == null;
        }

        public bool HasChild {
            get {
                return (ChildNodes != null) && (ChildNodes.Count > 0);
            }
        }

        //[Conditional("DEBUG")]
        //public override string ToString() {
            
        //}
    }
}
